FocusHandler
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Classpath: | gfx.managers.FocusHandler |
| File last modified: | Tuesday, 29 June 2010, 09:03:27 |
Manage focus between the components. Intercept focus from the player, and hand it off to the "focused" component through the display-list hierarchy using a bubbling approach. Focus can be interupted or handled on every level.
Summary
Constructor
Class properties
- instance
- Return a reference to the static FocusHandler instance.
Instance methods
- getFocus
- Returns the current focus, according to the focusHandler.
- setFocus
- Set focus to a component.
- handleInput
- Handle input events from the InputDelegate.
Constructor
FocusHandler
function FocusHandler (
)
Create a new FocusHandler instance. This method should only be called internally by the FocusHandler class, as the implementation is a Singleton.
Class properties
Instance methods
getFocus
function getFocus (
focusIdx:Number) : MovieClip
Returns the current focus, according to the focusHandler. This may vary from the actual stage focus.
handleInput
function handleInput (
event:Object) : Void
Handle input events from the InputDelegate. Input details are passed onto the first item in the
pathToFocus, which is a display list hierarchy of Scaleform components, or any view that implements a "handleInput" method. If a view "handles" input, it will return true. If this method receives a return value of false, it will pass the input onto the Scaleform player using the Selection.moveFocus() method. Parameters:
event:
The input event generated by the InputDelegate.
setFocus
function setFocus (
focus:MovieClip,
focusIdx:Number) : Void
Set focus to a component. This is called internally when stage focus changes, and can also be called manually to set focus to the first component in a movie. The actual focus is determined by recursively checking the
focusTarget of the component. Parameters:
focus:
The movieclip to apply focus to.